//
//  RGXQlcController.m
//  JiCaiBao
//
//  Created by rgx on 2017/1/13.
//  Copyright © 2017年 rgx. All rights reserved.
//

#import "RGXQlcController.h"

@interface RGXQlcController ()

@end

@implementation RGXQlcController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.navigationController.navigationBar.barTintColor = ColorWithRGB(231, 66, 66);
    self.navigationController.navigationBar.translucent = NO;
    [self setShowTitle:@"七乐彩"];
    [self initLeftNavigationBarItem_PreVC];
}


- (void)creatUI_Balls{
    
    UILabel *titleL = [[UILabel alloc]initWithFrame:CGRectMake(15, 0, 200, 30)];
    titleL.text = @"至少选择6个红球，1个蓝球";
    [titleL setFont:[UIFont systemFontOfSize:14]];
//    [self.midScrollerView addSubview:titleL];
    
    int bx, by = 0, ballW, ballH;
//    int blueY = 0;
    ballW = ballH = 50;
    
    float sep = (kScreenWidth -30 - 350)/6.0;
    sep = 5;
    ballH = ballW = (kScreenWidth - 5*6 - 30)/7;
    float hep = 20;
    int x = 15;
    int y = 50;
    
    //红球
    for(int r = 1 ; r<31; r++){
        
        bx = x + (r-1) % 7 * (ballW + sep);
        by = y +  (r-1) / 7 *(ballH + hep);
        CGRect rect = CGRectMake(bx, by, ballW, ballH);
        NSString *strTag = [NSString stringWithFormat:@"%d",r];
        ballView *ball = [[ballView alloc]initWithFrame:rect ballType:ballViewType_Red delegate:self tag:strTag need:YES];
//        [self.midScrollerView addSubview:ball];
        
    }
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
